import 'package:flutter/material.dart';
import 'package:flutter_lifecycle/flutter_lifecycle.dart';
import 'package:flutter_lifecycle_example/home_page/page2_nav2.dart';
import 'package:flutter_lifecycle_example/log.dart';

class Nav2 extends StatefulWidget {
  const Nav2({Key? key}) : super(key: key);

  @override
  State createState() {
    return _Nav2State();
  }
}

class _Nav2State extends State<Nav2> {
  // bool _showPage1 = true;
  // bool _showPage2 = false;

  @override
  void didChangeDependencies() {
    super.didChangeDependencies();
    // debugPrint("didChangeDependencies _Nav2HomeState");
  }

  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return BasePageLifecycle(
      onPageShow: (){
        logger.d('Nav2');
      },
      onInactive: (){
        logger.d('onInactive');
      },
      child: Nav2Page2(
        onHidePage2: () { },
      ),
    );
  }
}

